import request from '@/utils/request'

export function fetchList(data) { //根据Id查询User
  return request({
    url: '/user/findById',
    method: 'post',
    data: data
  })
}
export function createUser(data) {
  return request({
    url: '/user/create',
    method: 'post',
    data
  })
}
export function readUser(data) {
  return request({
    url: '/user/detail',
    method: 'get',
    data
  })
}
export function updateUser(data) {
  return request({
    url: '/user/update',
    method: 'post',
    data
  })
}
export function user_listAll(data) { //根据部门主键 deptId 查询部门人员列表
  return request({
    url: '/api/user/listAll',
    method: 'post',
    data: data
  })
}
export function user_deleteAll(data) { //批量删除
  return request({
    url: '/api/user/deleteAll',
    method: 'post',
    data: data
  })
}
export function user_save(data) { //新增user
  return request({
    url: '/api/user/save',
    method: 'post',
    data: data
  })
}
export function user_edit(data) { //修改user
  return request({
    url: '/api/user/edit',
    method: 'post',
    data: data
  })
}
export function user_editStatua(data) { //停用user
  return request({
    url: '/api/user/editUserStatus',
    method: 'post',
    data: data
  })
}
export function user_delete(data) { //根据id删除user
  return request({
    url: '/api/user/delete',
    method: 'post',
    data: data
  })
}
export function user_findById(data) { //
  return request({
    url: '/api/user/findById',
    method: 'post',
    data: data
  })
}
export function user_checkUser(data) { //
  return request({
    url: '/api/user/checkUser',
    method: 'post',
    data: data
  })
}

export function user_searchMail(data) { //查询部门和用户
  return request({
    url: '/api/user/searchMail',
    method: 'post',
    data: data
  })
}

export function user_searchGroup(data) { //查询部门和用户
  return request({
    url: '/api/user/searchGroup',
    method: 'post',
    data: data
  })
}
 